package solution;

import java.util.Scanner;

/**
 * Created by wangxingsheng on 2022/6/20.
 * Levenshtein距离，需要动态规划
 */
public class LevenshteinDistance {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] cl1 = in.nextLine().toCharArray();
        char[] cl2 = in.nextLine().toCharArray();
        if(cl1.length > cl2.length){
            char[] temp = cl1;
            cl1 = cl2;
            cl2 = temp;
        }
        int count = 0;
        for(int n = 0; n < cl1.length; n++){
            int i=0;
            for(; i < cl2.length; i++){
                if(cl1[n] == cl2[i]){
                    cl1[n] = ' ';
                    cl2[i] = ' ';
                    break;
                }
            }
            if(i == cl2.length){
                count++;
            }
        }
        System.out.println("-----: "+ count);
        for(char c : cl2){
            if(c != ' '){
                count++;
            }
        }
        System.out.println(cl1);
        System.out.println(cl2);
        System.out.println(count);
    }
}
